# -- coding: utf-8 --
from reflection_demo import demo01   # 模块对象


#

def page_url():
    name = input('请输入要跳转的页面')
    getattr(demo01, name)()  # 如果name是home，则与demo01.home的效果一致，使用()则可以执行函数

    # if name == 'login':
    #     demo01.login()
    # elif name == 'logout':
    #     demo01.logout()
    # elif name == 'home':
    #     demo01.home()
    # elif name == 'user':
    #     demo01.user()
    # else:
    #     print('输入错误')

if __name__ == '__main__':
    # page_url()
    # print(demo01.home())
    # rd = __import__('random')
    # print(rd.randint(1, 10))
    d1 = __import__('reflection_demo.demo01', fromlist=['demo01'])
    d1.home()